The din of a concerned crowd transformed into a tumultuous racket when Abdelhamid Sabiri's free kick caught out Thibaut Courtois at his near post and captain Romain Saiss added a slight touch to see Morocco into the lead.
A fan invasion in the opening match of the Olympic football tournament between Argentina and Morocco on Wednesday caused chaos, with Argentina eventually beaten 2-1 following a VAR review after play was suspended with the score tied at 2-2.
The 45-year-old Bopanna's final appearance on the Tour came at the Paris Masters, where he partnered Kazakhstan's Alexander Bublik, losing in the opening round earlier this week.
Cape Verde rarely played international football some 25 years ago but now head to next year's finals in North America as one of the nine African representatives.
Egypt become third African country to qualify for World Cup
Davis Cup: Bold move by India, captain Rajpal fields Dhakshineswar against Switzerland
India will travel to the city of Biel for the World Group I first-round tie, which will be played on indoor courts from September 12.
Boufal and Sabiri score to give Morocco 2-1 win over Brazil
India progressed to the Davis Cup Qualifiers for the first time ever after Sumit Nagal tamed aggressive teenager Henry Bernet in the first reverse singles to script the team's 3-1 win over Switzerland.
Morocco coach hails fighting spirit and passionate crowd
As the game wound on, Morocco fans screamed "Ole, ole, ole!" in unison, drowning out the handful of Portuguese fans and whistling whenever Portugal took possession of the ball.
Morocco gave their players time off for a second successive day on Thursday after the physical exertion of the Spain win.
Regragui's tactical masterclass sends Portugal packing
Reuters TV footage showed people smashing shop ventures and fights with police. Some fires could also be seen on avenue de Friedland close to the Champs Elysees.
The fans were in full voice during the national anthems and the stadium was bouncing.
In Morocco, an important member of the Arab League but where much of the population identifies as Amazigh, there has been some bemusement at the Arab embrace, including jokes that people from other Arab countries should finally accept the Moroccan dialect.
Morocco change the mood for African football with exploits in Qatar
Theo Hernandez's high hooked finish from a deflected Kylian Mbappe shot put the defending champions ahead and forced Walid Regragui's team to take the initiative, ending the game with more possession than Les Bleus.
Morocco are happy to sit back and look to punish opponents on the counter-attack using the speed and skill of Hakim Ziyech
IMAGES from the FIFA World Cup F Group F match played between Morocco and Canada on Thursday.
Retired Ivorian player and Chelsea legend Didier Drogba: "They did it!!!! Well done Morocco for this feat. Long live Africa."
Captain Mohamed Salah scored for Egypt as they eased to a 2-0 victory over Ethiopia in their 2026 World Cup qualifier on Friday, but 2022 semi-finalists Morocco needed a late winner from Bilal El Khannouss to defeat unfancied Niger.
At the stadium to congratulate her son was Sofiane Boufal's mother. Head Coach Walid Regragui's mother Fatima was there too, raining kisses on her son after the game.
Having become the first African team into the semis, Morocco now face Croatia in the third-place playoff on Saturday.
Veteran striker Girelli, 33, replaced 16-year-old midfielder Giulia Dragoni in the 83rd minute and needed only four minutes to make an impact
Images from the FIFA World Cup Group F match between Morocco and Croatia on Wednesday.
Morocco's Bounou felt dizzy but will play against Canada, says team doctor
Fans were flanked by hundreds of police trucks securing the area as they let off fireworks and flares to the sound of honks and cheers.
Croatia and Morocco will face off in Qatar for a second time after playing out a 0-0 draw in their group opener
Images from the FIFA World Cup Group F match between Belgium and Morocco on Sunday.
Images from the FIFA World Cup Quarter-final match between Portugal and Morocco on Saturday.
I told my players to take 1,000 penalties, says Spain's Luis Enrique
IMAGES from the FIFA World Cup semi-final between France and Morocco, played at Al Bayt Stadium on Wednesday.
Morocco relied on the usual mixture of North African style, combining committed defence with counter-attacks
A 64-team World Cup in 2030 should not be considered, CONCACAF President Victor Montagliani has said, joining some other confederations in opposing a plan presented by CONMEBOL.
Belgian police detained a dozen people and made one arrest on Sunday after Morocco's victory over Belgium in the World Cup match in Qatar triggered riots in Brussels with a car and some electric scooters set on fire.
Images from the FIFA World Cup third place playoff match between Croatia and Morocco on Saturday.
Saudi Arabia will host the men's soccer World Cup in 2034 while the 2030 edition will be held in Spain, Portugal and Morocco, with one-off matches in three South American countries, world soccer's governing body FIFA confirmed on Wednesday.
Coach Branko Ivankovic insisted China's World Cup qualifying campaign was still alive despite back-to-back losses to Saudi Arabia and Australia over the last five days leaving them bottom of Asian qualifying Group C.